import random

# 随机小数
a = random.random()
print(a)
# 随机整数:区间,都包含
a = random.randint(1, 10)
print(a)

list1 = [1, 2, 3, 4, 5, 6]
# 先获取随机索引，再获取随机数
print(list1[random.randint(0, len(list1) - 1)])

# 随机选取
print(random.choice(list1))
print(random.choice('hello'))

# 打乱，洗牌
random.shuffle(list1)
print(list1)

# 生成一段随机字母
from my_package import my_tools
print(my_tools.verfity_code(6))


# 游戏
from my_package import my_game
my_game.game1()
